package com.gitee.qdbp.general.thirdpart.api.wechat.service;

import java.util.Map;
import com.gitee.qdbp.able.exception.ServiceException;
import com.gitee.qdbp.general.thirdpart.api.trade.model.PrepayParams;
import com.gitee.qdbp.general.thirdpart.api.wechat.model.WechatPrepayParams;

public interface IWechatTradeService {

    /**
     * 获取支付参数
     * 
     * @param params 订单信息, 如果为空则取默认收款人信息
     * @return
     */
    Map<String, Object> getPaymentParams(PrepayParams params) throws ServiceException;

    /**
     * 电脑扫码支付<br>
     * https://pay.weixin.qq.com/wiki/doc/api/native.php?chapter=6_1<br>
     * H5网页支付<br>
     * https://pay.weixin.qq.com/wiki/doc/api/H5.php?chapter=15_1<br>
     * 公众号支付<br>
     * https://pay.weixin.qq.com/wiki/doc/api/jsapi.php?chapter=7_1<br>
     * 
     * @param params
     * @return
     * @throws ServiceException
     */
    Map<String, Object> createPrepay(WechatPrepayParams params) throws ServiceException;

    /** 支付成功后, 微信回调处理 **/
    String notifyHandle(String xml);

}
